SLUB:Unable to Allocate Memory
故障
如图:系统日志中报出不能分配内存
解决方法:
- 临时解决:重启相关节点
- 永久解决:
- 升级内核:3.10.0-1062.XXX.el7.x86_64
1
2
3yum provides kernel
yum install -y kernel-3.10.0-1062.9.1.el7.x86_64
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg - 添加内核参数 cgroup.memory=nokmem
1
2
3
4
5
6
7
8
9
10
11[root@acp2-node-1 ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_TERMINAL_OUTPUT="serial console"
GRUB_CMDLINE_LINUX="crashkernel=auto cgroup.memory=nokmem console=ttyS0 console=tty0 panic=5 net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
[root@acp2-node-1 ~]# - 保存退出,刷新grup菜单,并重启节点使永久生效
1
2[root@acp2-node-1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
[root@acp2-node-1 ~]# reboot - 查看是否生效
1
2[root@region ~]# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-1062.9.1.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto cgroup.memory=nokmem rd.lvm.lv=centos/root rhgb quiet
- 升级内核:3.10.0-1062.XXX.el7.x86_64
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.